<?php
/**
 * Created by PhpStorm.
 * User: lili
 * Date: 2018/12/30
 * Time: 12:48
 */

namespace system\core\route;

/*
*分配给控制器
*
*/
use app\index\controller\index;


class Dispatch
{
    
    
    

    /*
     * 执行反射类方法
     * @param array 方法数组[ moudle,controller,action]
     *
     * */
    public static function invokeMethod($routearr){
        $class = '\\app\\'.$routearr['m'].'\\controller\\'.$routearr['c'];
        $reflect = new \ReflectionMethod( $class,$routearr['a'] );
        $reflect->invoke(new $class);
    }
}